import Vue from 'vue'
import moment from 'moment'
Vue.prototype.moment = moment;
moment.locale('zh-cn', {
  meridiem : function (hour, minute, isLowercase) {
      if (hour < 9) {
          return "早上";
      } else if (hour < 11 && minute < 30) {
          return "上午";
      } else if (hour < 13 && minute < 30) {
          return "中午";
      } else if (hour < 18) {
          return "下午";
      } else {
          return "晚上";
      }
  },
  relativeTime : {
    future: "in %s",
    past:   "%s",
    s:  "%d秒",
    m:  "%d分钟",
    mm: "%d分钟前",
    h:  "%小时",
    hh: "%d小时前",
    d:  "%d天前",
    dd: "%d天前",
    M:  "%d月",
    MM: "%d月前",
    y:  "%d年前",
    yy: "%d年前"
}
});
